package tcln.gxtx.client.widget.treegrid.utils;

import com.extjs.gxt.ui.client.data.ModelData;

/**
 * A simple formatter for tree model data when it's rendered in a grid cell.
 * 
 * @param <M>
 *            Tree model type.
 * @author Truong Chau Lien Ngoc (lienngoc@gmail.com)
 */
public interface TreeGridModelDataFormatter<M extends ModelData> {

    /**
     * Formats given property of given model data to a string presentation.
     * 
     * @param model
     *            Model data.
     * @param property
     *            Property name to lookup for model data value.
     * @return String presentation of given property.
     */
    String format(M model, String property);
}
